﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GbmpTypeDefs.h"

namespace gcmp
{
    /// \brief 对象反序列化结果
    enum class NdbObjectUnserializeResult : UInt32
    {
        SUCCESS = 0,                                            ///< 成功
        FAIL = 1 << 0,                                          ///< 失败
        EMPTY_MEMORY_MODEL = 1 << 1,                            ///< 给的内存模型是空的
        EMPTY_PARENT_MEMORY_MODEL = 1 << 2,                     ///< 给的父类对象部分内存模型是空的
        CREATE_PARENT_OBJECT_FROM_MEMORY_MODEL_FAIL = 1 << 3,   ///< 从内存模型创建父类对象部分失败
        CREATE_PARENT_OBJECT_FROM_MEMORY_MODEL_SUCCESS = 1 << 4,///< 从内存模型创建父类对象部分成功
        CREATE_OWNERPTR_FROM_MEMORY_MODEL_FAIL = 1 << 5,        ///< 从内存模型创建OwnerPtr指向的内容失败
        ELEMENT_CONTAINS_WRONG_DATA = 1 << 6,                   ///< 对象含有错误数据
        FILE_CONTAINS_UNRECOGIZED_ELEMENT = 1 << 7,             ///< 含有不认识的对象
        META_FILE_PARSE_HEAD_FAIL = 1 << 8,                     ///< 元数据文件头部解析失败
        META_FILE_READ_SECTION_CONTENT_FAIL = 1 << 9,           ///< 元数据文件节内容读取失败
        META_FILE_VALIDATE_CLASS_SCHEMA_FAIL = 1 << 10,         ///< 元数据文件节ClassSchema验证失败
        NDB_FILE_MAJOR_VERSION_OBSOLETE = 1 << 11,              ///< 软件版本过低
        CAN_NOT_PARSE_CLASS_GUID = 1 << 12,                     ///< 无法解析类Id
        RAW_DATA_IS_EMPTY = 1 << 13,                            ///< rawdata为空
    };
}
